<?php
if(!defined('SABLOG_ROOT')) {
	exit('Access Denied');
}

$page = intval($_GET['page']);
if(empty($page)) {$page = 1;}
$pagestart = ($page - 1) * 30;
$pageend = $page * 30;
$query_sql = "SELECT * FROM content_p_attachments LIMIT $pagestart , 30";

$filedb = array();
$query = $DB->query($query_sql);

//无参数时执行的内容
while($file = $DB->fetch_array($query)) {
$file['url'] = $options['url']."attachment.php?id=".$file['attachmentid']."&tb=p";
$file['dateline'] = sadate('Y-m-d',$file['dateline']);

$pos = strrpos($file['filepath'], '.');
$file[fileext] = substr($file['filepath'],$pos+1);
$filedb[] = $file;
}

$options['title'] = "实践成果库";
$pagefile = 'practiselib';
?>